programming4us
           
 
 
Windows

Windows 7 Customization : Taking Ownership of Your Files

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
10/22/2010 6:17:51 PM
When you’re working in Windows 7, you may have trouble with a folder (or a file) because Windows tells you that you don’t have permission to edit (add to, delete, whatever) the folder. You might think the solution is to give your user account Full Control permissions on the folder, but it’s not as easy as that. Why not? Because you’re not the owner of the folder. (If you were, you’d have the permissions you need automatically.) So the solution is to first take ownership of the folder, and then assign your user account Full Control permissions over the folder.

Here are the steps to follow:

1.
Use Windows Explorer to locate the folder you want to take ownership of.

2.
Right-click the folder and then click Properties to open the folder’s property sheet.

3.
Display the Security tab.

4.
Click Advanced to open the Advanced Security Settings dialog box.

5.
Display the Owner tab.

6.
Click Edit.

7.
In the Change Owner To list, click your user account.

8.
Activate the Replace Owner on Subcontainers and Objects check box.

9.
Click OK. Windows 7 warns you that you need to reopen the property sheet to change the folder’s permissions.

10.
Click OK in the open dialog boxes.

11.
Right-click the folder and then click Properties to open the folder’s property sheet.

12.
Display the Security tab.

13.
If you do not see your user account in the Group or User Names list, click Edit, click Add, type your username, and click OK.

14.
Click your username.

15.
Click the Full Control check box in the Allow column.

16.
Click OK in the open dialog boxes.

Note that, obviously, this is quite a bit of work. If you only have to do it every once in a while, it’s not big thing, but if you find you have to take ownership regularly, you’ll probably want an easier way to go about it. You’ve got it! Listing 1 shows a Registry Editor file that modifies the Registry in such a way that you end up with a Take Ownership command in the shortcut menu that appears if you right-click any folder and any file.

Note

You can find the Registry Editor file (TakeOwnership.reg) on my website at www.mcfedries.com/Windows7Unleashed.


Listing 1. A Registry Editor File That Creates a Take Ownership Command
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administra-
tors:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant
administrators:F /t"


To use the file, double-click it and then enter your UAC credentials when prompted. As you can see in Figure 1, right-clicking (in this case) a folder displays a shortcut menu with a new Take Ownership command. Click that command, enter your UAC credentials, and sit back as Windows does all the hard work for you!

Figure 1. When you install the Registry mod, you see the Take Ownership command when you right-click a file.

Other -----------------
- Windows 7 Customization : Stopping Delete Confirmations
- Windows 7 : Managing a User Account - Limiting Computer Access
- Windows 7 : Managing a User Account
- Windows 7 : Understanding User Accounts and Permissions
- Windows Azure : Diagnostics
- Windows Azure : Common Storage Tasks - Utilizing Concurrent Updates
- Windows Azure : Common Storage Tasks - Modeling Data
- Windows Azure : Exploring Full-Text Search (part 3)
- Windows Azure : Exploring Full-Text Search (part 2) - Building an FTS Engine on Azure
- Windows Azure : Exploring Full-Text Search (part 1) - Indexing
- Windows Azure: Building a Secure Backup System (part 6) - Uploading Efficiently Using Blocks
- Windows Azure: Building a Secure Backup System (part 5)
- Windows Azure: Building a Secure Backup System (part 4)
- Windows Azure: Building a Secure Backup System (part 3)
- Windows Azure: Building a Secure Backup System (part 2) - Protecting Data in Motion
- Windows Azure: Building a Secure Backup System (part 1)
- Understanding Windows Azure Roles
- The Windows Azure Tool Set
- Windows Azure Table Overview (part 2) - Azure Tables Versus Traditional Databases
- Windows Azure Table Overview (part 1) - Core Concepts
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us